<!DOCTYPE html>
<meta charset="utf-8">
<html>
<title>Worklet: Worklet should report context destroyed</title>
<body>
<script src="../../../resources/gc.js"></script>
<script>
// This test was added for confirming a crash bug fix (see
// https://crbug.com/657450). This should not be upstreamed to WPT because of
// using testRunner and GCController.
if (window.testRunner) {
  testRunner.waitUntilDone();
  testRunner.dumpAsText();
}

function tryCrash()
{
  document.frame.CSS.paintWorklet;
  tCF1.outerHTML = "";
  gc();
  if (window.testRunner)
    testRunner.notifyDone();
}
</script>
<div id=tCF1><iframe onload="tryCrash()" name=frame id=frame></iframe></div>
</body>
</html>
